import Vue from 'vue'
import Toasted from 'vue-toasted';
const ToastedOptions = {
	iconPack : 'custom-class',
	icon:'material-icons iconxiangqing',
	className:'aaaaa',
	containerClass:'aaaaa',

	action : [
	{
		text : 'Confirm',
		icon:'material-icons iconqueren',
		class:'ToastedAction',
		// href:'http://www.baidu.com',
		// target:'#aaa',
		push:'active',
		onClick : (e, toastObject) => {
			toastObject.goAway(0);
		}
	},
	{
		text : 'Cancel',
		icon:'material-icons iconcancel',
		class:'ToastedAction',
		onClick : (e, toastObject) => {
			toastObject.goAway(0);
		}
	}
	],

	onComplete(){
		console.log('Toastr over')
	}

}
Vue.use(Toasted, ToastedOptions)

Vue.toasted.register('myToaste', (payload) => {

	return  payload.message ? payload.message :'请填写信息'
},
{
	type : 'show',
	icon : 'material-icons iconshibai'
})